<template>
	<el-dialog
		:visible="true"
		width="80%"
		:destroy-on-close="true"
		class="rempadding"
		:before-close="handleClose"
	>
		<div slot="title" class="dialog-title">
			<el-form :inline="true" label-width="auto">
				<el-row>
					<el-col :span="24">
						<el-form-item
							:label="$t('common.agent_number') + ' : '"
						>
							{{ rowVal.proxyName }}
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
		</div>
		<el-table
			v-loading="loading"
			size="mini"
			border
			:data="tableData"
			class="small-size-table"
			style="margin-bottom: 15px"
			:header-cell-style="getRowClass"
			element-loading-spinner="el-icon-loading"
			show-summary
			:summary-method="
				(val) => handleDayRow(val, subSummary, totalSummary)
			"
			highlight-current-row
		>
			<template v-if="activeName === 'all'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ formatDate(String(scope.row.reportDate)) || '-' }}
					</template>
				</el-table-column>
				<el-table-column
					prop="totalBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.totalBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubTotalServiceChargeContributionAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部服务费贡献'"
				>
					<template slot-scope="scope">
						{{ handleCurrency('USDT') }}
						{{
							handleNumber(
								'USDT',
								scope.row
									.dxClubTotalServiceChargeContributionAmount
							)
						}}
					</template>
				</el-table-column>
				<el-table-column
					prop="otherBetAmount"
					align="center"
					min-width="200"
					:label="'其他场馆投注金额'"
				>
					<template slot-scope="scope">
						{{ handleCurrency('USDT') }}
						{{ handleNumber('USDT', scope.row.otherBetAmount) }}
					</template>
				</el-table-column>
				<el-table-column
					prop="otherValidBetAmount"
					align="center"
					min-width="200"
					:label="'其他场馆有效投注'"
				>
					<template slot-scope="scope">
						{{ handleCurrency('USDT') }}
						{{
							handleNumber('USDT', scope.row.otherValidBetAmount)
						}}
					</template>
				</el-table-column>
				<el-table-column
					prop="dxTotalNetAmount"
					align="center"
					min-width="200"
					:label="'德州场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dxTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyTotalNetAmount"
					align="center"
					min-width="200"
					:label="'体育场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.tyTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.tyTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrTotalNetAmount"
					align="center"
					min-width="200"
					:label="'真人场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.zrTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.zrTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djTotalNetAmount"
					align="center"
					min-width="200"
					:label="'电竞场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.djTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.djTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="qpTotalNetAmount"
					align="center"
					min-width="200"
					:label="'棋牌场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.qpTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.qpTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpTotalNetAmount"
					align="center"
					min-width="200"
					:label="'彩票场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.cpTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.cpTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dyTotalNetAmount"
					align="center"
					min-width="200"
					:label="'电子场馆盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dyTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dyTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherAdjustmentTotalNetAmount"
					align="center"
					min-width="200"
					:label="'其他盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.otherAdjustmentTotalNetAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.otherAdjustmentTotalNetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="totalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.totalNetAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.totalNetAmount) }}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'dz'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubServiceChargeHandBetCount"
					align="center"
					min-width="200"
					:label="'德州俱乐部注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{
								handleNumber(
									'',
									scope.row.dxClubServiceChargeHandBetCount,
									0
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubNetAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部投注盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxClubNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dxClubNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxSquidNetAmount"
					align="center"
					min-width="200"
					:label="'鱿鱼游戏盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxSquidNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dxSquidNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubServiceChargeRoundAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部局服务费'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dxClubServiceChargeRoundAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxClubServiceChargeRoundAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubServiceChargeHandAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部手牌服务费'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dxClubServiceChargeHandAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxClubServiceChargeHandAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubTotalServiceChargeContributionAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部服务费贡献'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.dxClubTotalServiceChargeContributionAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxClubServiceChargeContributionRebateAmount"
					align="center"
					min-width="200"
					:label="'德州俱乐部服务费贡献分成'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.dxClubServiceChargeContributionRebateAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.dxClubServiceChargeContributionRebateAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxInsureBetCount"
					align="center"
					min-width="200"
					:label="'德州保险注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{
								handleNumber('', scope.row.dxInsureBetCount, 0)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxInsureBetAmount"
					align="center"
					min-width="200"
					:label="'德州保险投注金额'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxInsureBetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxInsureValidBetAmount"
					align="center"
					min-width="200"
					:label="'德州保险有效投注'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxInsureValidBetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxInsureNetAmount"
					align="center"
					min-width="200"
					:label="'德州保险投注盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxInsureNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxInsureNetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxInsureNetRebateAmount"
					align="center"
					min-width="200"
					:label="'德州保险盈亏分成'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dxInsureNetRebateAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxInsureNetRebateAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxValueAddedTotalAmount"
					align="center"
					min-width="200"
					:label="'德州增值服务消费'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dxValueAddedTotalAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxValueAddedTotalAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxValueAddedTotalRebateAmount"
					align="center"
					min-width="200"
					:label="'德州增值服务消费分成'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.dxValueAddedTotalRebateAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.dxValueAddedTotalRebateAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dxTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dxTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dxTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'other'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="otherBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.otherBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.otherBetAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.otherBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.otherValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.otherValidBetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="otherNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.otherNetAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.otherNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.otherNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.otherNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.otherRebateAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.otherRebateAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.otherRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.otherRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherAmount"
					align="center"
					min-width="200"
					:label="'其他收支项'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.otherAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.otherAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="otherTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.otherTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.otherTotalNetAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'ty'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="tyBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.tyBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.tyBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.tyBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.tyValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.tyValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="tyNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.tyNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.tyNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.tyNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.tyNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.tyRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.tyRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.tyRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.tyRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="tyTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.tyTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.tyTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'dj'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="djBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.djBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.djBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.djBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.djValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.djValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="djNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.djNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.djNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.djNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.djNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.djRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.djRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.djRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.djRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="djTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.djTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.djTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'cp'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="cpBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.cpBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.cpBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.cpBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.cpValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.cpValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="cpNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.cpNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.cpNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.cpNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.cpNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.cpRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.cpRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.cpRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.cpRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="cpTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.cpTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.cpTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'hccp'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="hccpBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.hccpBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.hccpBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.hccpBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.hccpValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.hccpValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="hccpNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.hccpNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.hccpNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.hccpNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.hccpNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.hccpRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.hccpRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.hccpRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.hccpRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="hccpTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.hccpTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.hccpTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'zr'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="zrBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.zrBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.zrBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.zrBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.zrValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.zrValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="zrNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.zrNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.zrNetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrNetRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row.zrNetRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row.zrNetRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.zrRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.zrRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrRebateRecalculationAdjustmentAmount"
					align="center"
					min-width="200"
					:label="'返点重算调整'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(
									scope.row
										.zrRebateRecalculationAdjustmentAmount
								)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber(
									'USDT',
									scope.row
										.zrRebateRecalculationAdjustmentAmount
								)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrRewardAmount"
					align="center"
					min-width="200"
					:label="'真人打赏'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.zrRewardAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.zrRewardAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="zrTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.zrTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.zrTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'qp'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="qpBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.qpBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="qpBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.qpBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.qpBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="qpValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.qpValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.qpValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="qpNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.qpNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.qpNetAmount) }}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="qpRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.qpRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.qpRebateAmount) }}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="qpTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.qpTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.qpTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
			<template v-if="activeName === 'dy'">
				<el-table-column
					key="staticsDate"
					prop="staticsDate"
					align="center"
					min-width="150"
					:label="'统计日期'"
					show-overflow-tooltip
				>
					<template slot-scope="scope">
						{{ scope.row.reportDate || '-' }}
					</template>
				</el-table-column>

				<el-table-column
					prop="dyBetCount"
					align="center"
					min-width="200"
					:label="'注单量'"
				>
					<template slot-scope="scope">
						<span>
							{{ handleNumber('', scope.row.dyBetCount, 0) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dyBetAmount"
					align="center"
					min-width="200"
					:label="'投注金额'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.dyBetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.dyBetAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dyValidBetAmount"
					align="center"
					min-width="200"
					:label="'有效投注'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dyValidBetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dyValidBetAmount)
							}}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="dyNetAmount"
					align="center"
					min-width="200"
					:label="'投注盈亏'"
				>
					<template slot-scope="scope">
						<span :style="handleNumberColor(scope.row.dyNetAmount)">
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.dyNetAmount) }}
						</span>
					</template>
				</el-table-column>

				<el-table-column
					prop="dyRebateAmount"
					align="center"
					min-width="200"
					:label="'有效投注返点'"
				>
					<template slot-scope="scope">
						<span
							:style="handleNumberColor(scope.row.dyRebateAmount)"
						>
							{{ handleCurrency('USDT') }}
							{{ handleNumber('USDT', scope.row.dyRebateAmount) }}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dyActivityBonus"
					align="center"
					min-width="200"
					:label="'电子活动奖金'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dyActivityBonus)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dyActivityBonus)
							}}
						</span>
					</template>
				</el-table-column>
				<el-table-column
					prop="dyTotalNetAmount"
					align="center"
					min-width="200"
					:label="'总盈亏'"
				>
					<template slot-scope="scope">
						<span
							:style="
								handleNumberColor(scope.row.dyTotalNetAmount)
							"
						>
							{{ handleCurrency('USDT') }}
							{{
								handleNumber('USDT', scope.row.dyTotalNetAmount)
							}}
						</span>
					</template>
				</el-table-column>
			</template>
		</el-table>
		<!-- 分页 -->
		<el-pagination
			v-show="!!total"
			class="text-right"
			:current-page.sync="pageNum"
			background
			layout="total, sizes,prev, pager, next, jumper"
			:page-size.sync="pageSize"
			:page-sizes="pageSizes"
			:total="total"
			:pager-count="9"
			@current-change="handleCurrentChange"
			@size-change="handleSizeChange"
		></el-pagination>
		<!-- <div slot="footer" class="dialog-footer" style="text-align: center">
			<el-button type="primary" @click="handleClose">关闭</el-button>
		</div> -->
	</el-dialog>
</template>
<script>
import list from '@/mixins/list'
import summaryList from './summaryList'
export default {
	mixins: [list, summaryList],
	props: {
		rowVal: {
			type: Object,
			default: () => {}
		},
		activeName: {
			type: String,
			default: 'all'
		},
		closeDialog: {
			type: Function,
			default: () => {}
		}
	},
	data() {
		return {
			loading: false,
			tableData: [],
			totalSummary: {},
			subSummary: {}
		}
	},
	methods: {
		formatDate(dateString) {
			// 确保输入字符串是8位数字
			if (dateString.length !== 8 || isNaN(Number(dateString))) {
				return '-'
			}

			// 切片字符串并插入短横线
			const year = dateString.slice(0, 4)
			const month = dateString.slice(4, 6)
			const day = dateString.slice(6, 8)

			// 返回格式化后的日期字符串
			return `${year}-${month}-${day}`
		},
		loadData() {
			this.loading = true
			this.rowVal.pageNum = this.pageNum
			this.rowVal.pageSize = this.pageSize
			const api = this.activeName === 'all' ? 'getReportRecalculateDetailListPage' : 'getReportRecalculateListPage'
			this.$api[api](this.rowVal)
				.then((res) => {
					this.loading = false
					if (res.code === 200) {
						this.tableData = []
						this.tableData = res?.data?.record || []
						this.subSummary = res?.data?.summary || {}
						this.total = res?.data?.totalRecord || 0
					}
				})
				.catch(() => {
					this.loading = false
				})
			const api2 = this.activeName === 'all' ? 'getReportDayDetailSummary' : 'getReportDaySummary'
			this.$api[api2](this.rowVal)
				.then((res) => {
					this.loading = false
					if (res.code === 200) {
						this.totalSummary = res?.data || {}
					}
				})
				.catch(() => {
					this.loading = false
				})
		},
		handleClose() {
			this.closeDialog(false)
		}
	}
}
</script>
<style lang="scss" scoped>
.fenye {
	text-align: center;
}
::v-deep .el-table__body-wrapper {
	overflow-y: auto;
	max-height: 45vh;
}
</style>
